package com.ricky.room.db

import androidx.room.*
import kotlinx.coroutines.flow.Flow

/**
 * @ClassName: UserFlowDao
 * @Description:
 * @Author: Haiyang
 * @Date: 2021/7/23 21:28
 */
@Dao
interface UserFlowDao {
    @Insert(onConflict = OnConflictStrategy.REPLACE)
    fun insertUser(vararg users: User)

    @Delete
    fun deleteUser(user: User)

    @Query("SELECT * FROM user")
    fun queryAllUser(): Flow<List<User>>
}